#include<iostream>
using namespace std;
int main()
{ int d,p,n,i;
  cout<<"n=";cin>>n;
d=2;
while(n>1)
{ p=0;
while(n%d==0)
{ p=p+1;
  n=n/d;
}
if(p>0)
cout<<d<<" "<<p<<" ";
d=d+1;
}
}
